// DlgXSINFO.cpp : implementation file
//

#include "stdafx.h"
#include "a1.h"
#include "DlgXSINFO.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgXSINFO dialog


CDlgXSINFO::CDlgXSINFO(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgXSINFO::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgXSINFO)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
		m_tabXs=new CTabXS(21);
		xs_ph="";
}


void CDlgXSINFO::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgXSINFO)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgXSINFO, CDialog)
	//{{AFX_MSG_MAP(CDlgXSINFO)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgXSINFO message handlers

void CDlgXSINFO::OnOK() 
{
	// TODO: Add extra validation here
	int i=m_tabXs->m_list->GetSelectionMark();

//	this->m_tabXs->m_edits[0].GetWindowText(xs_ph);

	xs_ph=this->m_strdataPh=	m_tabXs->m_list->GetItemText(i,0);
	this->m_strdataId=	m_tabXs->m_list->GetItemText(i,1);
	this->m_strdataName=m_tabXs->m_list->GetItemText(i,2);
	this->m_strdataYsf=	m_tabXs->m_list->GetItemText(i,3);
	this->m_strdataSsf=	m_tabXs->m_list->GetItemText(i,4);
	this->m_strdataWsf=	m_tabXs->m_list->GetItemText(i,5);
	this->m_strdataJsfs=m_tabXs->m_list->GetItemText(i,11);
	jq=			m_tabXs->m_list->GetItemText(i,12);
	CDialog::OnOK();
}

BOOL CDlgXSINFO::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CRect rect;
	this->GetClientRect(rect);
	rect.top=20;
	rect.bottom-=60;

	this->m_tabXs->Create(WS_CHILD|WS_VISIBLE|WS_TABSTOP,rect,this,ID_TABCTRL_YAOPIN);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CDlgXSINFO::DestroyWindow() 
{

	return CDialog::DestroyWindow();
}

CDlgXSINFO::~CDlgXSINFO()
{
	delete this->m_tabXs;
	m_tabXs=NULL;
}
